#pragma once
#include "..\common.h"
#include "DAbstract.h"
#include "DCell.h"

namespace DeepClasses
{

	class DMap: public DAbstract
	{
	public:
		DMap();
		virtual ~DMap();

		int GenerateMap(int z, int rows, int cols, std::list<DMaterial*>* mats);
		int ClearMap();

		int GetRows();
		int GetCols();
		int GetDepth();

		wchar_t GetSymbolAt(int k, int i, int j);

		// does NOT check input
		DCell* GetCellAt(int k, int i, int j);

		// does NOT check input
		DCell* GetCellAt(TLocation& loc);

		// returns NULL if parameters are out of bounds
		DCell* GetCellAtShift(TLocation& loc, int k, int i, int j);
		
	private:
		// array of cells [depth][row][column]
		DCell*** m_cells;

		int m_rows,m_cols,m_depth;
	};
};